home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / srvr_tlb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  7.3 KB  |  195 lines

  1. // ************************************************************************ //
  2. // WARNING                                                                  //
  3. // -------                                                                  //
  4. // The types declared in this file were generated from data read from a     //
  5. // Type Library. If this type library is explicitly or indirectly (via      //
  6. // another type library referring to this type library) re-imported, or the //
  7. // 'Refresh' command of the Type Library Editor activated while editing the //
  8. // Type Library, the contents of this file will be regenerated and all      //
  9. // manual modifications will be lost.                                       //
  10. // ************************************************************************ //
  11.  
  12. // ************************************************************************ //
  13. #ifndef   __srvr_TLB_h__
  14. #define   __srvr_TLB_h__
  15.  
  16. #pragma option push -b
  17.  
  18.  
  19. #include <sysdefs.h>
  20. #include <utilcls.h>
  21. #include <stdvcl.hpp>
  22. #include <ocxproxy.h>
  23.  
  24. namespace Srvr_tlb
  25. {
  26.  
  27. // *********************************************************************//
  28. // HelpString: srvr Library
  29. // Version:    1.0
  30. // *********************************************************************//
  31.  
  32.  
  33. // *********************************************************************//
  34. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  35. //   Type Libraries     : LIBID_xxxx                                    //
  36. //   CoClasses          : CLSID_xxxx                                    //
  37. //   DISPInterfaces     : DIID_xxxx                                     //
  38. //   Non-DISP interfaces: IID_xxxx                                      //
  39. // *********************************************************************//
  40. DEFINE_GUID(LIBID_srvr, 0x921449E3, 0x8905, 0x11D1, 0xB6, 0x95, 0x00, 0x20, 0xAF, 0x3F, 0x4B, 0x77);
  41. DEFINE_GUID(IID_IEditServer, 0x921449E4, 0x8905, 0x11D1, 0xB6, 0x95, 0x00, 0x20, 0xAF, 0x3F, 0x4B, 0x77);
  42. DEFINE_GUID(CLSID_EditServer, 0x921449E5, 0x8905, 0x11D1, 0xB6, 0x95, 0x00, 0x20, 0xAF, 0x3F, 0x4B, 0x77);
  43.  
  44. // *********************************************************************//
  45. // Forward declaration of interfaces defined in Type Library            //
  46. // *********************************************************************//
  47. interface IEditServer;
  48.  
  49. // *********************************************************************//
  50. // Declaration of CoClasses defined in Type Library                     //
  51. // (NOTE: Here we map each CoClass to it's Default Interface            //
  52. // *********************************************************************//
  53. typedef IEditServer EditServer;
  54. // *********************************************************************//
  55. // Interface: IEditServer
  56. // Flags:     (4416) Dual OleAutomation Dispatchable
  57. // GUID:      {921449E4-8905-11D1-B695-0020AF3F4B77}
  58. // *********************************************************************//
  59. interface IEditServer : public IDispatch
  60. {
  61. public:
  62.   virtual HRESULT STDMETHODCALLTYPE Clear(void) = 0; // [1]
  63.   virtual HRESULT STDMETHODCALLTYPE get_EditNum(int* Value/*[out,retval]*/) = 0; // [2]
  64.   virtual HRESULT STDMETHODCALLTYPE set_EditNum(int Value/*[in]*/) = 0; // [2]
  65.   virtual HRESULT STDMETHODCALLTYPE get_EditStr(BSTR* Value/*[out,retval]*/) = 0; // [3]
  66.   virtual HRESULT STDMETHODCALLTYPE set_EditStr(BSTR Value/*[in]*/) = 0; // [3]
  67.   virtual HRESULT STDMETHODCALLTYPE SetThreeStr(BSTR s1/*[in]*/, BSTR s2/*[in]*/, BSTR s3/*[in]*/, 
  68.                                                 BSTR* result/*[out,retval]*/) = 0; // [4]
  69. };
  70.  
  71. // *********************************************************************//
  72. // SmartIntf: TCOMIEditServer
  73. // Interface: IEditServer
  74. // *********************************************************************//
  75. class TCOMIEditServer : public TComInterface<IEditServer>
  76. {
  77. public:
  78.   TCOMIEditServer() {}
  79.   TCOMIEditServer(IEditServer *intf, bool addRef = false) : TComInterface<IEditServer>(intf, addRef) {}
  80. };
  81.  
  82. // *********************************************************************//
  83. // DispIntf:  IEditServer
  84. // Flags:     (4416) Dual OleAutomation Dispatchable
  85. // GUID:      {921449E4-8905-11D1-B695-0020AF3F4B77}
  86. // *********************************************************************//
  87. class IEditServerDisp : public TAutoDriver<IEditServer>
  88. {
  89.   typedef TDispId<IEditServer> _TDispID;
  90. public:
  91.  
  92.   IEditServerDisp()
  93.   {}
  94.  
  95.   IEditServerDisp& operator=(IEditServer *pintf)
  96.   {
  97.     TAutoDriver<IEditServer>::Bind(pintf);
  98.   }
  99.  
  100.   HRESULT BindDefault(/*Binds to CoClass EditServer*/)
  101.   {
  102.     return OLECHECK(Bind(CLSID_EditServer));
  103.   }
  104.  
  105.   HRESULT /*[VT_HRESULT:0]*/  Clear()
  106.   {
  107.     static _TDispID _dispid(*this, OLETEXT("Clear"), DISPID(1));
  108.     return OleFunction(_dispid);
  109.   }
  110.  
  111.   HRESULT /*[VT_HRESULT:0]*/  get_EditNum(int* Value/*[out,retval]*/)
  112.   {
  113.     static _TDispID _dispid(*this, OLETEXT("EditNum"), DISPID(2));
  114.     TAutoArgs<0> _args;
  115.     return OutRetValSetterPtr(Value /*[VT_INT:1]*/, _args, OlePropertyGet(_dispid, _args));
  116.   }
  117.  
  118.   int get_EditNum(void)
  119.   {
  120.     int Value;
  121.     get_EditNum(&Value);
  122.     return Value;
  123.   }
  124.  
  125.   HRESULT /*[VT_HRESULT:0]*/  set_EditNum(int Value/*[in]*/)
  126.   {
  127.     static _TDispID _dispid(*this, OLETEXT("EditNum"), DISPID(2));
  128.     TAutoArgs<1> _args;
  129.     _args[1] = Value /*[VT_INT:0]*/;
  130.     return OlePropertyPut(_dispid, _args);
  131.   }
  132.  
  133.   HRESULT /*[VT_HRESULT:0]*/  get_EditStr(BSTR* Value/*[out,retval]*/)
  134.   {
  135.     static _TDispID _dispid(*this, OLETEXT("EditStr"), DISPID(3));
  136.     TAutoArgs<0> _args;
  137.     return OutRetValSetterPtr(Value /*[VT_BSTR:1]*/, _args, OlePropertyGet(_dispid, _args));
  138.   }
  139.  
  140.   BSTR get_EditStr(void)
  141.   {
  142.     BSTR Value;
  143.     get_EditStr(&Value);
  144.     return Value;
  145.   }
  146.  
  147.   HRESULT /*[VT_HRESULT:0]*/  set_EditStr(BSTR Value/*[in]*/)
  148.   {
  149.     static _TDispID _dispid(*this, OLETEXT("EditStr"), DISPID(3));
  150.     TAutoArgs<1> _args;
  151.     _args[1] = Value /*[VT_BSTR:0]*/;
  152.     return OlePropertyPut(_dispid, _args);
  153.   }
  154.  
  155.   HRESULT /*[VT_HRESULT:0]*/  SetThreeStr(BSTR s1/*[in]*/,BSTR s2/*[in]*/,BSTR s3/*[in]*/,
  156.                                           BSTR* result/*[out,retval]*/)
  157.   {
  158.     static _TDispID _dispid(*this, OLETEXT("SetThreeStr"), DISPID(4));
  159.     TAutoArgs<3> _args;
  160.     _args[1] = s1 /*[VT_BSTR:0]*/;
  161.     _args[2] = s2 /*[VT_BSTR:0]*/;
  162.     _args[3] = s3 /*[VT_BSTR:0]*/;
  163.     return OutRetValSetterPtr(result /*[VT_BSTR:1]*/, _args, OleFunction(_dispid, _args));
  164.   }
  165.  
  166.   __property int EditNum = {read = get_EditNum, write = set_EditNum};
  167.   __property BSTR EditStr = {read = get_EditStr, write = set_EditStr};
  168. };
  169.  
  170.  
  171. // *********************************************************************//
  172. // COCLASS DEFAULT INTERFACE CREATOR
  173. // CoClass  : EditServer
  174. // Interface: TCOMIEditServer
  175. // *********************************************************************//
  176. class CoEditServer : public CoClassCreator
  177. {
  178. public:
  179.   static TCOMIEditServer Create(void);
  180.   static TCOMIEditServer CreateRemote(LPWSTR machineName);
  181.  
  182.   static HRESULT Create(TCOMIEditServer& defIntfObj);
  183.   static HRESULT CreateRemote(LPWSTR machineName, TCOMIEditServer& defIntfObj);
  184. };
  185.  
  186. };     // namespace Srvr_tlb
  187.  
  188. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  189. using  namespace Srvr_tlb;
  190. #endif
  191.  
  192. #pragma option pop
  193.  
  194. #endif // __srvr_TLB_h__
  195.